//package com.zmn.plat.dubbo.impl.price;
//
//import com.zmn.common.dto2.ResponseDTO;
//import com.zmn.manager.common.database.annotation.ReadOnlyConnection;
//import com.zmn.plat.business.interfaces.price.AdvanceFlowBService;
//import com.zmn.plat.common.dto.category.AssCategoryDRO;
//import com.zmn.plat.common.dto.price.ItemTo;
//import com.zmn.plat.common.dto.price.ProductTariffCheckQuery;
//import com.zmn.plat.common.dto.price.advance.*;
//import com.zmn.plat.common.dto.product.base.ProductBaseDRO;
//import com.zmn.plat.common.dto.product.tariff.TariffBackProductDRO;
//import com.zmn.plat.common.exception.PlatException;
//import com.zmn.plat.dubbo.interfaces.price.AdvanceFlowRemoteService;
//import com.zmn.plat.dubbo.utils.DubboConsts;
//import lombok.extern.slf4j.Slf4j;
//import org.apache.dubbo.config.annotation.Service;
//import org.springframework.util.CollectionUtils;
//
//import javax.annotation.Resource;
//import javax.validation.constraints.NotEmpty;
//import javax.validation.constraints.NotNull;
//import java.util.List;
//import java.util.Map;
//
///**
// * 描述: 提前付流程实现类（所有接口前提是有计价器试点和预计价试点，专为提前付项目使用，接口是按照前台操作顺序来的）
// *
// * @author guoqiao
// * @since 2021/8/19 10:03
// */
//@Service(version = DubboConsts.INTERFACE_VERSION, validation = "true")
//@Slf4j
//public class AdvanceFlowRemoteServiceImpl implements AdvanceFlowRemoteService {
//
//    @Resource
//    private AdvanceFlowBService advanceFlowBService;
//
//    @Override
//    @ReadOnlyConnection
//    public ResponseDTO<List<ProductBaseDRO>> listShowProduct(AdvanceFtProductQuery query) {
//        log.info("AdvanceFlowRemoteServiceImpl.listShowProduct入参：{}", query);
//        try {
//            List<ProductBaseDRO> dros = advanceFlowBService.listShowProduct(query);
//            return ResponseDTO.success(dros);
//        } catch (PlatException e) {
//            return ResponseDTO.fromErrorCodeTable(e.getErrorCode());
//        } catch (Exception e) {
//            log.error("listShowProduct查询失败,原因:{}", e.getMessage(), e);
//            return ResponseDTO.fail("查询失败，程序异常");
//        }
//    }
//
//    @Override
//    @ReadOnlyConnection
//    public ResponseDTO<List<ItemTo>> listItemByQuery(AdvanceProductItemQuery query) {
//        log.info("AdvanceFlowRemoteServiceImpl.listItemByQuery入参：{}", query);
//        try {
//            List<ItemTo> dros = advanceFlowBService.listItemByQuery(query);
//            return ResponseDTO.success(dros);
//        } catch (PlatException e) {
//            return ResponseDTO.fromErrorCodeTable(e.getErrorCode());
//        } catch (Exception e) {
//            log.error("listItemByQuery查询失败,原因:{}", e.getMessage(), e);
//            return ResponseDTO.fail("查询失败，程序异常");
//        }
//    }
//
//    @Override
//    @ReadOnlyConnection
//    public ResponseDTO<List<AssCategoryDRO>> listCategTwoByQuery(AdvanceProductQuery query) {
//        log.info("AdvanceFlowRemoteServiceImpl.listCategTwoByQuery入参：{}", query);
//        try {
//            List<AssCategoryDRO> dros = advanceFlowBService.listCategTwoByQuery(query);
//            return ResponseDTO.success(dros);
//        } catch (PlatException e) {
//            return ResponseDTO.fromErrorCodeTable(e.getErrorCode());
//        } catch (Exception e) {
//            log.error("listCategTwoByQuery查询失败,原因:{}", e.getMessage(), e);
//            return ResponseDTO.fail("查询失败，程序异常");
//        }
//    }
//
//    @Override
//    @ReadOnlyConnection
//    public ResponseDTO<List<TariffBackProductDRO>> listProductByQuery(AdvanceProductQuery query) {
//        log.info("AdvanceFlowRemoteServiceImpl.listProductByQuery入参：{}", query);
//        try {
//            List<TariffBackProductDRO> dros = advanceFlowBService.listProductByQuery(query);
//            return ResponseDTO.success(dros);
//        } catch (PlatException e) {
//            return ResponseDTO.fromErrorCodeTable(e.getErrorCode());
//        } catch (Exception e) {
//            log.error("listProductByQuery查询失败,原因:{}", e.getMessage(), e);
//            return ResponseDTO.fail("查询失败，程序异常");
//        }
//    }
//
////    @Override
////    public ResponseDTO<List<ItemTo>> listItemPriceByQuery(AdvanceProductItemPriceQuery query) {
////        log.info("AdvanceFlowRemoteServiceImpl.listItemPriceByQuery入参：{}", query);
////        try {
////            List<ItemTo> dros = advanceFlowBService.listItemPriceByQuery(query);
////            return ResponseDTO.success(dros);
////        } catch (PlatException e) {
////            return ResponseDTO.fromErrorCodeTable(e.getErrorCode());
////        } catch (Exception e) {
////            log.error("ListItemPriceByQuery查询失败,原因:{}", e.getMessage(), e);
////            return ResponseDTO.fail("查询失败，程序异常");
////        }
////    }
//
//    @Override
//    @ReadOnlyConnection
//    public ResponseDTO<Map<Integer, Boolean>> listCheckTariff(AdvanceFtProductCheckTariffQuery query) {
//        log.info("AdvanceFlowRemoteServiceImpl.listCheckTariff入参：{}", query);
//        try {
//            if (CollectionUtils.isEmpty(query.getProductIdList())) {
//                return ResponseDTO.fail("参数合法");
//            }
//            Map<Integer, Boolean> dros = advanceFlowBService.listCheckTariff(query);
//            return ResponseDTO.success(dros);
//        } catch (PlatException e) {
//            return ResponseDTO.fromErrorCodeTable(e.getErrorCode());
//        } catch (Exception e) {
//            log.error("listCheckTariff查询失败,原因:{}", e.getMessage(), e);
//            return ResponseDTO.fail("查询失败，程序异常");
//        }
//    }
//
//    @Override
//    @ReadOnlyConnection
//    public ResponseDTO<Map<Integer, Boolean>> listCheckAdvance(AdvanceFtProductCheckTariffQuery query) {
//        log.info("AdvanceFlowRemoteServiceImpl.listCheckAdvance入参：{}", query);
//        try {
//            if (CollectionUtils.isEmpty(query.getProductIdList())) {
//                return ResponseDTO.fail("参数合法");
//            }
//            Map<Integer, Boolean> dros = advanceFlowBService.listCheckAdvance(query);
//            return ResponseDTO.success(dros);
//        } catch (PlatException e) {
//            return ResponseDTO.fromErrorCodeTable(e.getErrorCode());
//        } catch (Exception e) {
//            log.error("listCheckAdvance查询失败,原因:{}", e.getMessage(), e);
//            return ResponseDTO.fail("查询失败，程序异常");
//        }
//    }
//
//}
